package com.lianjing.sh.acceleo.controller.tool.service;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.uml2.uml.NamedElement;

public class AcceleoEx_Service {
	
	public boolean oclIsTypeOfEx(NamedElement obj, Object type){
//		obj instanceof Enumeration : true
//		return ((EClass)type).getInstanceClass().isAssignableFrom(((NamedElement)obj).getClass());
//		return ((EClass)type).getInstanceClass().isInstance(obj);
		
//		type 								: Enumeration -> DataType [org.eclipse.uml2.uml.Enumeration]
//		((EClass)type).getClass();			: org.eclipse.emf.ecore.impl.EClassImpl
//		((EClass)type).getInstanceClass()	: interface org.eclipse.uml2.uml.Enumeration
		
		return ((EClass)type).getInstanceClass().isInstance(obj);
	}

}
